

class Debug()
    {
    }

void debug_msg(QVariant msg)
{
    static int i = 0;

    QFile file("debug_msg.txt");
    if (i == 0)
    {
        i = 1;
        file.open(QFile::WriteOnly | QFile::Truncate | QFile::Text);
    }
    else
    {
        file.open(QFile::WriteOnly | QFile::Append | QFile::Text);
    }

    file.write(msg.toString().toStdString().c_str());
    file.write(QString("\n").toStdString().c_str());
    file.close();
}
